<template>
	<view>
		<view class="page">
			<view class="form-card">
				<view class="form-row flex-center">
					<view class="form-label">姓名 <text class="text-danger">*</text></view>
					<view class="flex_bd">
						<input type="text" placeholder="" disabled v-model="name" class="form-control">
					</view>
				</view>
				<view class="form-row flex-center">
					<view class="form-label">住院号 <text class="text-danger">*</text></view>
					<view class="flex_bd">
						<input type="text" placeholder="" disabled v-model="number" class="form-control">
					
					</view>
				</view>
				<view class="form-row flex-center">
					<view class="form-label">性别 <text class="text-danger">*</text></view>
					<view class="flex_bd">
						<input type="text" placeholder="" disabled v-model="sex" class="form-control" @click="show = true">
						<u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback">
						</u-action-sheet>
					</view>
					<u-icon name="arrow-down" color="#807f89" size="24"></u-icon>
				</view>
				<view class="form-row flex-center">
					<view class="form-label">床号 <text class="text-danger">*</text></view>
					<view class="flex_bd">
						<input type="text" placeholder="" disabled v-model="bed" class="form-control" @click="show1 = true">
						<u-action-sheet :list="list" v-model="show1" @click="actionSheetCallback1">
						</u-action-sheet>
					</view>
					<u-icon name="arrow-down" color="#807f89" size="24"></u-icon>
				</view>
				<view class="form-row flex-center">
					<view class="form-label">身份证 </view>
					<view class="flex_bd">
						<input type="text" placeholder="选填（非必填）" v-model="idCard" class="form-control">
					</view>
					<view class="iconfont icon-saoma"></view>
				</view>
				<view class="form-row flex-center">
					<view class="form-label">手机号 </view>
					<view class="flex_bd">
						<input type="text" placeholder="选填（非必填）" v-model="tel" class="form-control">
					</view>
				</view>
			</view>
		    <view class="l-footer">
		    	<u-button @click="" type="primary" :custom-style="btnStyle">保存信息</u-button>
		    </view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name: '林生斌',
				number: '007',
				sex: '保密',
				bed: '+3',
				idCard: '',
				tel: '',
				show: false,
				actionSheetList: [{
						text: '男'
					},
					{
						text: '女'
					},
					{
						text: '保密'
					}
				],
				show1: false,
				list: [{
						text: '+1'
					},
					{
						text: '+2'
					},
					{
						text: '+3'
					}
				],
				btnStyle: {
					background:'#00a4e8',
					color: '#ffffff',
					height:'96rpx',
					fontSize:'36rpx',
					borderRadius:"16rpx"
				},
			}
		},
		onLoad() {

		},
		methods: {
			actionSheetCallback(index) {
				this.sex = this.actionSheetList[index].text;
			},
			actionSheetCallback1(index) {
				this.bed = this.list[index].text;
			}
		}
	}
</script>

<style lang="scss">
	.page {
		padding: 20rpx 30rpx;
	}

	.form-card {
		padding: 0 30rpx;
		background-color: #fff;
		overflow: hidden;
		border-radius: 12rpx;

	}

	.form-tip {
		padding: 20rpx;
		font-size: 24rpx;
		color: #fc2932;
	}

	.form-row {
		padding: 32rpx 0;
		border-bottom: 1px solid #eeeeee;
	}

	.form-row:last-child {
		border-bottom: 0;
	}

	.form-row .form-control {
		text-align: right;
	}

	.form-row .iconfont {
		margin-left: 20rpx;
		font-size: 32rpx;
		color: #0b51a2;
	}
	
	.form-row .u-icon{
		margin-left: 20rpx;
	}

	.form-label {
		font-size: 30rpx;
	}

	.text-danger {
		color: #fc2932;
	}

	.flex-end {
		justify-content: flex-end;
	}
	
	.l-footer{
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 30rpx;
		z-index: 111;
	}
</style>
